package ynu.edu.online_course.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import ynu.edu.online_course.entity.CourseTypeModified;

@Mapper
public interface CourseTypeModifiedMapper {

    @Insert("INSERT INTO course_type_modified (course, modified_to, modified_by, modified_at) " +
            "VALUES (#{course.id}, #{modifiedTo.id}, #{modifiedBy.id}, #{modifiedAt})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertCourseTypeModifiedRecord(CourseTypeModified courseTypeModified);
}
